package com.acminds.fotoporter.persistence.entities;

import java.io.Serializable;
import javax.persistence.*;
import java.sql.Timestamp;
import java.util.Date;
import java.util.List;


/**
 * The persistent class for the ALBUM database table.
 * 
 */
@Entity
@Table(name="ALBUM")
public class Album extends com.acminds.fotoporter.persistence.BaseDTO implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@Column(name="ALBUM_ID")
	private int albumId;

	@Column(name="ALBUM_DESC")
	private String albumDesc;

	@Column(name="ALBUM_NAME")
	private String albumName;

	@Column(name="CREATE_DATE")
	private Timestamp createDate;

    @Temporal( TemporalType.DATE)
	@Column(name="LAST_VIEWED_DATE")
	private Date lastViewedDate;

	//bi-directional many-to-one association to UserInfo
    @ManyToOne
	@JoinColumn(name="USER_INFO_ID")
	private UserInfo userInfo;

	//bi-directional many-to-one association to Image
	@OneToMany(mappedBy="album")
	private List<Image> images;

    public Album() {
    }

	public int getAlbumId() {
		return this.albumId;
	}

	public void setAlbumId(int albumId) {
		this.albumId = albumId;
	}

	public String getAlbumDesc() {
		return this.albumDesc;
	}

	public void setAlbumDesc(String albumDesc) {
		this.albumDesc = albumDesc;
	}

	public String getAlbumName() {
		return this.albumName;
	}

	public void setAlbumName(String albumName) {
		this.albumName = albumName;
	}

	public Timestamp getCreateDate() {
		return this.createDate;
	}

	public void setCreateDate(Timestamp createDate) {
		this.createDate = createDate;
	}

	public Date getLastViewedDate() {
		return this.lastViewedDate;
	}

	public void setLastViewedDate(Date lastViewedDate) {
		this.lastViewedDate = lastViewedDate;
	}

	public UserInfo getUserInfo() {
		return this.userInfo;
	}

	public void setUserInfo(UserInfo userInfo) {
		this.userInfo = userInfo;
	}
	
	public List<Image> getImages() {
		return this.images;
	}

	public void setImages(List<Image> images) {
		this.images = images;
	}
	
}